//
//  ByeCodeFooter.m
//  PlayerWorld
//
//  Created by 汪的一声就哭了！ on 16/6/23.
//  Copyright © 2016年 刘成. All rights reserved.
//

#import "ByeCodeFooter.h"

@implementation ByeCodeFooter

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        self.trashBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        [self addSubview:self.trashBtn];
        [self.trashBtn setImage:[[UIImage imageNamed:@"icon_del"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
        
        self.lineView = [[UIView alloc] init];
        [self addSubview:self.lineView];
        self.lineView.backgroundColor = [UIColor colorWithRed:204.0/255.0 green:205.0/255.0 blue:206.0/255.0 alpha:1];
        
        self.numLabel1 = [[UILabel alloc] init];
        [self addSubview:self.numLabel1];
        self.numLabel1.textColor = [UIColor colorWithRed:254.0/255.0 green:180.0/255.0 blue:101.0/255.0 alpha:1];
        self.numLabel1.text = @"0";
        
        self.numLabel2 = [[UILabel alloc] init];
        [self addSubview:self.numLabel2];
        self.numLabel2.text = @"注";
        
        self.numLabel3 = [[UILabel alloc] init];
        [self addSubview:self.numLabel3];
        self.numLabel3.textColor = [UIColor colorWithRed:254.0/255.0 green:180.0/255.0 blue:101.0/255.0 alpha:1];
        self.numLabel3.text = @"0.00";
        
        self.numLabel4 = [[UILabel alloc] init];
        [self addSubview:self.numLabel4];
        self.numLabel4.text = @"元";
        
        self.sureBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        [self addSubview:self.sureBtn];
        self.sureBtn.backgroundColor = [UIColor colorWithRed:66/255.0 green:45/255.0 blue:81/255.0 alpha:1];
        [self.sureBtn setTitle:@"确定" forState:UIControlStateNormal];
        [self.sureBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.sureBtn.layer.cornerRadius = 3;
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.trashBtn.frame = CGRectMake(0, 0, 60, self.bounds.size.height);
    self.lineView.frame = CGRectMake(60, 10, 1, 30);
    self.numLabel1.frame = CGRectMake(80, 0, 30, 50);
    self.numLabel2.frame = CGRectMake(110, 0, 20, 50);
    self.numLabel3.frame = CGRectMake(130, 0, 60, 50);
    self.numLabel4.frame = CGRectMake(190, 0, 20, 50);
    self.sureBtn.frame = CGRectMake(self.bounds.size.width-60, 10, 50, 30);
}
@end
